<?php
namespace app\api\controller\accountrobat;

use app\api\controller\Base;
use app\api\controller\mytool\Sendmessage;
use app\common\model\company\Contract;
use app\common\model\orderhawa\HawaList;
use app\common\model\power\Rolepower;
use app\common\model\quotation\QuotationList;
use app\common\model\company\Company;
use app\common\model\user\User as UserModel;
use app\api\controller\Pub;
use think\facade\Env;
use think\File;

//机器使用创建系统使用
class Robat extends Base
{
    /**
     * 初始化
     */
    // public function initialize()
    // {
    //     parent::initialize();
    //     self::is_login();
    //     Rolepower::powerguard(101002);
    // }

     /**
     * 产废订单创建完后直接执行的
     * @param  SyncCenter $center [description]
     * @return [type]             [description]
     */
    public static function hawaorder($id)
    {
        $data = HawaList::get($id);
        if (empty($data)) {
            return serr('缺少数据');
        }
        if ((int)$data['State'] == HawaList::STATEOK) {
            $data['company'] = Company::get($data['CompanyId']);
            switch (Account_Create) {
                case 'hubei':
                    self::hawaorder_hubei($data,$id);
                    break;
                
                default:
                    return sok('无需创建');
                    break;
            }
        }
        return serr('操作失败');
    }

    /**
     * 危废收集单生成后创建湖北的台账
     * @return [type] [description]
     */
    public static function hawaorder_hubei(){
        
    }
    
}
